﻿<!-- #include file="mymin.asp" -->
<%
Call Head2()

%><title>编辑文章</title></head><body><div class="main400">
<%

dim id,classid,test,title,author,author1
id=request.querystring("id")
classid=request("classid") 
if id="" or IsNumeric(id) = False then Call Error2("ID错误！")

if classid="" or IsNumeric(classid) = False then Call Error2("ID错误！")

test=request.form("test")
title=request.form("title")
author=request.form("author")
author1=request.form("author1")

if test="" or title="" or (author="" And author1="") then Call Error2("各项不能为空！")

If IsNumeric(author) And author1="" Then Call Error2("来源不能是纯数字")

if len(title)>30 or len(author)>15 or len(test)>20000 then Call Error2("标题不要超过30字，来源不要超过15字，文章内容不要超过20000字，分多篇写。这有助于提高效率！")


set rs=server.createobject("adodb.recordset")
rs.open "select * from 74hu_article Where id="&id,myconn,1,3
rs("test")=test
rs("HU_date")=time_now
rs("title")=title
If author1="" Then rs("HU_author")=author
rs.update
rs.close
set rs=nothing
w "文章编辑成功!"
%><br/>----------<br/>
<a href="smsview.asp?sid=<%=sid%>&amp;id=<%=id%>&amp;ids=<%=classid%>">[返回文章]</a><br/>
<a href="adminsmscl.asp?sid=<%=sid%>&amp;id=<%=classid%>">[文章分类]</a><%Call Last2%>